Skip to content

Conversation

@ShaneK
Copy link
Member

@ShaneK ShaneK commented Dec 2, 2025

Issue number: resolves #24177


What is the current behavior?

Currently, Ionic Framework React Router only supports React Router 5. This has many issues and unsupported/broken features.

What is the new behavior?

With this change, Ionic Framework will support React Router 6 while still supporting transitions in the same way a native app does.

Most of what caused this change to take a long time is that React Router 5 and React Router 6 have fundamental differences in how they handle components once they're no longer part of the view. In this change, we move away from relying on React Router directly so much and have our own implementation for deciding how views get dealt with during navigation and when they're cleaned up, allowing for us to still transition between them like we need to while still using React Router as much as we possibly can.

This change will also lay the foundation for the migration to React Router 7, which will ideally be easier since most of the hard work has been dealt with here.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Current dev build (last updated 2025-12-18):

⚠️ WARNING: If you're going to use this dev build on an existing react project, you'll need to migrate to React Router 6. Migrating a large project at this point might be a bad idea since this will not release until v9, which will require further migrations and have other breaking changes! I do not currently have migration documentation for this, but it's a relatively easy process from the migrations I've been doing.

8.7.13-dev.11766090775.11e2bebb

thetaPC and others added 30 commits May 8, 2025 14:49
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
…ter 6

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
…ct router 6

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
… router 6

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good! 🚀 My comments are mostly questions & potential issues with either the test app or the router code.

…RouterOutlet (#30844)

Issue number: resolves [an issue from a
comment](#24177 (comment))

---------

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Currently, Ionic's RR6 doesn't support relative routes in the same way
RR6 does. Routes that do not start with a `/`do not work in the Ionic
RR6 implementation in some cases.

## What is the new behavior?

With this change, we properly support these route styles and more
closely align with normal RR6 route support.

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

Current dev build:
```
 8.7.12-dev.11765307927.1f491e92
```

This PR will be merged into the RR6 branch, which will be squash+merged
into the major 9 branch. This will prevent major 9 from having commits
in the change log on release that reference fixing things that are only
available in major 9.
Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woooooooo! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: react @ionic/react package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants